package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.PageResult;
import cn.wolfcode.crm.query.PurchaseOrderItemQueryObject;
import cn.wolfcode.crm.service.IPurchaseOrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("purchaseOrderItem")
public class PurchaseOrderItemController {
    @Autowired
    private IPurchaseOrderItemService purchaseOrderService;

    @RequestMapping("")
    public String list(){
        return "purchaseOrderItem/list";
    }

    @RequestMapping("list")
    @ResponseBody
    public PageResult list(PurchaseOrderItemQueryObject qo){
        return purchaseOrderService.query(qo);
    }


    @RequestMapping("queryItemByOrderId")
    @ResponseBody
    public PageResult queryItemByOrderId(PurchaseOrderItemQueryObject qo){

        return purchaseOrderService.query(qo);
    }
}
